<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Using RSVG with GIO: RSVG Libary Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.0">
<link rel="home" href="index.html" title="RSVG Libary Reference Manual">
<link rel="up" href="rsvg.html" title="Part I. API Reference">
<link rel="prev" href="RsvgHandle.html" title="RsvgHandle">
<link rel="next" href="rsvg-Using-RSVG-with-cairo.html" title="Using RSVG with cairo">
<meta name="generator" content="GTK-Doc V1.26 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#rsvg-Using-RSVG-with-GIO.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#rsvg-Using-RSVG-with-GIO.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rsvg.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="RsvgHandle.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="rsvg-Using-RSVG-with-cairo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="rsvg-Using-RSVG-with-GIO"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="rsvg-Using-RSVG-with-GIO.top_of_page"></a>Using RSVG with GIO</span></h2>
<p>Using RSVG with GIO</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="rsvg-Using-RSVG-with-GIO.html#rsvg-handle-set-base-gfile" title="rsvg_handle_set_base_gfile ()">rsvg_handle_set_base_gfile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="rsvg-Using-RSVG-with-GIO.html#rsvg-handle-read-stream-sync" title="rsvg_handle_read_stream_sync ()">rsvg_handle_read_stream_sync</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="returnvalue">RsvgHandle</span></a> *
</td>
<td class="function_name">
<a class="link" href="rsvg-Using-RSVG-with-GIO.html#rsvg-handle-new-from-gfile-sync" title="rsvg_handle_new_from_gfile_sync ()">rsvg_handle_new_from_gfile_sync</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="returnvalue">RsvgHandle</span></a> *
</td>
<td class="function_name">
<a class="link" href="rsvg-Using-RSVG-with-GIO.html#rsvg-handle-new-from-stream-sync" title="rsvg_handle_new_from_stream_sync ()">rsvg_handle_new_from_stream_sync</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="rsvg-Using-RSVG-with-GIO.html#RsvgHandleFlags" title="enum RsvgHandleFlags">RsvgHandleFlags</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GFlags</a>
    <span class="lineart">╰──</span> RsvgHandleFlags
</pre>
</div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="rsvg-handle-set-base-gfile"></a><h3>rsvg_handle_set_base_gfile ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
rsvg_handle_set_base_gfile (<em class="parameter"><code><a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> *handle</code></em>,
                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *base_file</code></em>);</pre>
<p>Set the base URI for <em class="parameter"><code>handle</code></em>
 from <em class="parameter"><code>file</code></em>
.
Note: This function may only be called before <a class="link" href="RsvgHandle.html#rsvg-handle-write" title="rsvg_handle_write ()"><code class="function">rsvg_handle_write()</code></a>
or <a class="link" href="rsvg-Using-RSVG-with-GIO.html#rsvg-handle-read-stream-sync" title="rsvg_handle_read_stream_sync ()"><code class="function">rsvg_handle_read_stream_sync()</code></a> has been called.</p>
<div class="refsect3">
<a name="rsvg-handle-set-base-gfile.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handle</p></td>
<td class="parameter_description"><p>a <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_file</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
<hr>
<div class="refsect2">
<a name="rsvg-handle-read-stream-sync"></a><h3>rsvg_handle_read_stream_sync ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
rsvg_handle_read_stream_sync (<em class="parameter"><code><a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> *handle</code></em>,
                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> *stream</code></em>,
                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Reads <em class="parameter"><code>stream</code></em>
 and writes the data from it to <em class="parameter"><code>handle</code></em>
.</p>
<p>If <em class="parameter"><code>cancellable</code></em>
 is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the
operation was cancelled, the error <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be
returned.</p>
<div class="refsect3">
<a name="rsvg-handle-read-stream-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>handle</p></td>
<td class="parameter_description"><p>a <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a location to store a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="rsvg-handle-read-stream-sync.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if reading <em class="parameter"><code>stream</code></em>
succeeded, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
with <em class="parameter"><code>error</code></em>
filled in</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
<hr>
<div class="refsect2">
<a name="rsvg-handle-new-from-gfile-sync"></a><h3>rsvg_handle_new_from_gfile_sync ()</h3>
<pre class="programlisting"><a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="returnvalue">RsvgHandle</span></a> *
rsvg_handle_new_from_gfile_sync (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *file</code></em>,
                                 <em class="parameter"><code><a class="link" href="rsvg-Using-RSVG-with-GIO.html#RsvgHandleFlags" title="enum RsvgHandleFlags"><span class="type">RsvgHandleFlags</span></a> flags</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> for <em class="parameter"><code>file</code></em>
.</p>
<p>If <em class="parameter"><code>cancellable</code></em>
 is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the
operation was cancelled, the error <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be
returned.</p>
<div class="refsect3">
<a name="rsvg-handle-new-from-gfile-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags from <a class="link" href="rsvg-Using-RSVG-with-GIO.html#RsvgHandleFlags" title="enum RsvgHandleFlags"><span class="type">RsvgHandleFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a location to store a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="rsvg-handle-new-from-gfile-sync.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> on success, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> with <em class="parameter"><code>error</code></em>
filled in</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
<hr>
<div class="refsect2">
<a name="rsvg-handle-new-from-stream-sync"></a><h3>rsvg_handle_new_from_stream_sync ()</h3>
<pre class="programlisting"><a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="returnvalue">RsvgHandle</span></a> *
rsvg_handle_new_from_stream_sync (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> *input_stream</code></em>,
                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a> *base_file</code></em>,
                                  <em class="parameter"><code><a class="link" href="rsvg-Using-RSVG-with-GIO.html#RsvgHandleFlags" title="enum RsvgHandleFlags"><span class="type">RsvgHandleFlags</span></a> flags</code></em>,
                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> for <em class="parameter"><code>stream</code></em>
.</p>
<p>If <em class="parameter"><code>cancellable</code></em>
 is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the
operation was cancelled, the error <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be
returned.</p>
<div class="refsect3">
<a name="rsvg-handle-new-from-stream-sync.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>input_stream</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>base_file</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GFile.html#GFile-struct"><span class="type">GFile</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags from <a class="link" href="rsvg-Using-RSVG-with-GIO.html#RsvgHandleFlags" title="enum RsvgHandleFlags"><span class="type">RsvgHandleFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a location to store a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="rsvg-handle-new-from-stream-sync.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="RsvgHandle.html" title="RsvgHandle"><span class="type">RsvgHandle</span></a> on success, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> with <em class="parameter"><code>error</code></em>
filled in</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p>
</div>
</div>
<div class="refsect1">
<a name="rsvg-Using-RSVG-with-GIO.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="RsvgHandleFlags"></a><h3>enum RsvgHandleFlags</h3>
<div class="refsect3">
<a name="RsvgHandleFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="RSVG-HANDLE-FLAGS-NONE:CAPS"></a>RSVG_HANDLE_FLAGS_NONE</p></td>
<td class="enum_member_description">
<p>none</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RSVG-HANDLE-FLAG-UNLIMITED:CAPS"></a>RSVG_HANDLE_FLAG_UNLIMITED</p></td>
<td class="enum_member_description">
<p>Allow any SVG XML without size limitations.
  For security reasons, this should only be used for trusted input!
  Since: 2.40.3</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="RSVG-HANDLE-FLAG-KEEP-IMAGE-DATA:CAPS"></a>RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA</p></td>
<td class="enum_member_description">
<p>Keeps the image data when loading images,
 for use by cairo when painting to e.g. a PDF surface. This will make the
 resulting PDF file smaller and faster.
 Since: 2.40.3</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26</div>
</body>
</html>